package com.jdrx.sw.sewage.service;

import com.jdrx.sw.sewage.beans.entity.FactoryPO;
import com.jdrx.sw.sewage.dao.FactoryDAO;
import com.jdrx.sw.sewage.service.base.BaseServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FactoryServiceImpl extends BaseServiceImpl {

    public static final Logger logger = LoggerFactory.getLogger(FactoryServiceImpl.class);

    @Autowired
    private FactoryDAO factoryDAO;

    public List<String> selectNameList() {
        return factoryDAO.selectNameList();
    }

    public List<FactoryPO> selectList() {
        return factoryDAO.selectList();
    }

    public void add(String name) {
        FactoryPO factoryPO = new FactoryPO();
        factoryPO.setName(name);
        factoryDAO.insert(factoryPO);
    }
}
